package com.atguigu.study.controller;

import com.atguigu.study.service.ChatAssistant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Marco
 * @Description
 * @date 2025/8/17 23:41
 * @email 3293336923@qq.com
 */
@Slf4j
@RestController
public class HighApiController {

    @Autowired
    private ChatAssistant chatAssistant;

    @GetMapping("marco/high/api")
    public     String     chat(@RequestParam(value = "question" , defaultValue = "你是谁？") String  question){
        String result = chatAssistant.chat(question);
        log.info("result:{}" , result);

        return  result;
    }
}
